import request from '@/utils/index.js'

//获取客户列表
export function getClientsList(params){
  return request({
    url:'/clients',
    method:'get',
    params
  })
}

//删除客户
export function delClients(id){
  return request({
    url:`/clients/${id}`,
    method:'delete'
  })
}

//添加用户
export function addClients(data){
  return request({
    url:'/clients',
    method:'post',
    data
  })
}
//编辑客户
export function editClients(data){
  return request({
    url:`/clients/${data.id}`,
    method:'put',
    data
  })
}

//获取指定用户
export function getClientsDetail(id){
  return request({
    url:`/clients/${id}`,
    method:'get'
  })
}

//获取客户数量
export function getClientsCount(params){
  return request({
    url:'/clients/count',
    method:'get',
    params
  })
}